package com.swx.identityservice.service;

import com.github.pagehelper.PageInfo;

import java.util.List;

public interface CrudService<Entity> {
    List<Entity> selectAll();

    Entity selectByPrimaryKey(Object id);

    PageInfo<Entity> selectEntitysByPage(int pageIndex, int pageSize);

//    PageInfo<Entity> selectEntitysByPage(int pageIndex, int pageSize, String sort);

    PageInfo<Entity> selectEntitysByPage(int pageIndex, int pageSize, List<Entity> entities);

    int insert(Entity entity);

    int insertSelective(Entity entity);

    int updateByPrimaryKey(Entity entity);

    int updateByPrimaryKeySelective(Entity entity);

    int deleteByPrimaryKey(Object id);
}
